import { lazy } from "react";
import { CheckCircleIcon } from "tdesign-icons-react";
import { IRouter } from "../index";

const result: IRouter[] = [
  {
    path: "/result",
    meta: {
      title: "结果页",
      Icon: CheckCircleIcon,
      hidden: true,
      requiredRole: "user",
    },
    children: [
      {
        path: "success",
        Component: lazy(() => import("pages/Result/Success")),
        meta: {
          title: "成功页",
          requiredRole: "user",
        },
      },
      {
        path: "fail",
        Component: lazy(() => import("pages/Result/Fail")),
        meta: {
          title: "失败页",
          requiredRole: "user",
        },
      },
      {
        path: "network-error",
        Component: lazy(() => import("pages/Result/NetworkError")),
        meta: {
          title: "网络异常",
          requiredRole: "user",
        },
      },
      {
        path: "403",
        Component: lazy(() => import("pages/Result/403")),
        meta: {
          title: "无权限",
          requiredRole: "user",
        },
      },
      {
        path: "404",
        Component: lazy(() => import("pages/Result/404")),
        meta: {
          title: "访问页面不存在页",
          requiredRole: "user",
        },
      },
      {
        path: "500",
        Component: lazy(() => import("pages/Result/500")),
        meta: {
          title: "服务器出错页",
          requiredRole: "user",
        },
      },
      {
        path: "maintenance",
        Component: lazy(() => import("pages/Result/Maintenance")),
        meta: {
          title: "系统维护页",
          requiredRole: "user",
        },
      },
    ],
  },
];

export default result;
